package com.example.xksys.utils.graph;

import java.awt.*;

public class Gpos {
private int x,y,w,h;
private Color c;
public Gpos(int w,int h)
{
	this.w=w;
	this.h=h;
}
private int GetRand(int extent)
{
	return (int)Math.round(Math.random()*extent);
}
public int getX() {
	return x;
}
public void setX(int x) {
	this.x = x;
}
public int getY() {
	return y;
}
public void setY(int y) {
	this.y = y;
}
public int getW() {
	return w;
}
public void setW(int w) {
	this.w = w;
}
public int getH() {
	return h;
}
public void setH(int h) {
	this.h = h;
}
public Color getC() {
	return c;
}
public void setC(Color c) {
	this.c = c;
}
public void newGpos()
{
	this.x=this.GetRand(this.w);
	this.y=this.GetRand(this.h);
	this.c=new Color(this.GetRand(255),this.GetRand(255),this.GetRand(255));
}
}
